import { request } from "../network/rquest";

//添加地址
export function addaddress(params) {
    return request({
        url: '/api/address',
        method: 'post',
        params
    })
}

//编辑地址
export function Editaddress(id, params) {
    return request({
        url: `/api/address${id}`,
        method: 'put',
        params
    })

}

//删除地址
export function DeleteAddress(id) {
    return request({
        url: `/api/address/${id}`,
        method: 'DELETE',
    })
}

//地址列表
export function getAddresslist() {
    return request({
        url: '/api/address',
        method: 'get',
    })
}

//地址详情
export function getAddressDetail(id) {
    return request({
        url: `/api/address/${id}`,
        method: 'get'
    })
}